package reflect;

import reflect.annotations.AutoRunMethod;

import java.lang.reflect.Method;

public class ReflectDemo13 {
    public static void main(String[] args) throws Exception {
        Class cls=Class.forName("reflect.Person");
        Method mtd=cls.getDeclaredMethod("dosome");
        if(mtd.isAnnotationPresent(AutoRunMethod.class)){
            AutoRunMethod ar=mtd.getAnnotation(AutoRunMethod.class);
            int times=ar.times();
            System.out.println(times);
        }
    }
}
